<%@ include file="/WEB-INF/include/base.jsp" %>
<%@ include file="/WEB-INF/include/base/standardObjects.jsp" %>
<%@ page import="com.web.bdo.util.UserDetails" %>
<%@ page import="org.apache.struts.util.LabelValueBean" %>
<%@ page import="java.util.ArrayList" %>
<%@ page isELIgnored="false" %>
<html>
	<head> 
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title><bean:message key="title.application"/></title>			
		<link rel="stylesheet" type="text/css" href="./common/css/master.css"/>		
		<script language="javascript" src="./common/accountUtil.js"></script>
	</head>
	<body onload="onLoad();">
	<%@ include file="/WEB-INF/include/base/variables.jsp" %>
	<%
		User user = (User)session.getAttribute("user");													
		ArrayList<LabelValueBean> userDetails = new UserDetails(user);		
	%>	
	<c:set var="userDetails" value="<%=userDetails %>"/>
	<table id="body" width="700px">
		<tr><td id="header">This is header</td></tr>
		<tr>
			<td id="subheader">
				<%@ include file="/WEB-INF/include/components/mainlinks.jsp" %>
			</td>
		</tr>
		<%@ include file="/WEB-INF/include/components/mainnav.jsp" %>
		<tr>
			<td id="content">
				<table class="c_table" width="800px">
					<tr>
						<td class="t_heading" colspan="2">
							<div class="t_heading_ul">
								<div class="t_heading_ur">
									<bean:message key="heading.account"/>
								</div>
							</div>							
						</td>
					</tr>
					<tr>						
						<td width="20%" valign="top" style="padding-left:10px;" >
							<table width="100%">
								<tr>
									<td class="l_tab">									
										<a id="lnk" href="#" onclick="activateTab(this);">
											<div class="l_tab_ul">
												<div class="l_tab_ll">
													<bean:message key="tab.userDetails"/>
												</div>
											</div>											
										</a>
									</td>									
								</tr>
								<tr>
									<td class="l_tab">										
										<a href="#" onclick="activateTab(this);">
											<div class="l_tab_ul_">
												<div class="l_tab_ll_">
													<bean:message key="tab.flightReservations"/>
												</div>
											</div>
										</a>
									</td>									
								</tr>
								<tr>
									<td class="l_tab">
										<a href="#" onclick="activateTab(this);">
											<div class="l_tab_ul_">
												<div class="l_tab_ll_">
													<bean:message key="tab.settings"/>
												</div>
											</div>
										</a>
									</td>									
								</tr>
							</table>							
						</td>
						<td>
							<div class="c_ll">
								<div class="c_lr">								
									<table id="account" bgcolor="white" width="97%">
										<tr id="trUserDetails">
											<td>
												<table width="100%">
													<tr id="trDetails">
														<td>
															<table id="details" class="standard" width="100%">								
																<tr>
																	<td class="heading" colspan="2">
																		<div class="t_heading_ul_">
																			<div class="t_heading_ur_">
																				<h4><bean:message key="heading.details"/></h4>&nbsp;							
																				<a href="#" onclick="showEditDetails();"><bean:message key="link.editDetails"/></a>
																			</div>
																		</div>
																	</td>
																</tr>
																<logic:iterate id="detail" name="userDetails">
																<tr>
																	<td class="label">
																		<bean:write name="detail" property="label"/>
																	</td>
																	<td class="data">
																		<bean:write name="detail" property="value"/>
																	</td>
																</tr>
																</logic:iterate>
																<tr>
																	<td colspan="2">
																		&nbsp;
																	</td>
																</tr>
															</table>									
														</td>
													</tr>
												<tr id="trEditDetails">
													<td>
														<table id="editDetails" class="standard" width="100%">
															<tr>
																<td class="heading" colspan="2">
																	<div class="t_heading_ul_">
																		<div class="t_heading_ur_">
																			<h4><bean:message key="heading.editDetails"/></h4>&nbsp;																			
																			<a href="#" onclick="closeEditDetails();"><bean:message key="link.closeEditDetails"/></a>
																		</div>
																	</div>
																</td>
															</tr>
															<tr>
																<td>
																	<iframe src="<%= request.getContextPath() %>/editDetailsPage.do " height="410px" width="100%" scrolling="no" frameborder="0"></iframe>
																</td>
															</tr>
														</table>
													</td>
												</tr>
											</table>
										</td>
									</tr>	
									<tr id="trFlights">
										<td>
											<com:inner_box styleId="flights" styleClass="standard" heading="Flight" items="${userDetails }" width="100%"/>									
																
										</td>
									</tr>
									<tr id="trSettings">
										<td>
											<table id="settings" class="standard" width="100%">								
												<tr>
													<td class="heading" colspan="2">
														<div class="t_heading_ul_">
															<div class="t_heading_ur_">
																<h4><bean:message key="heading.settings"/></h4>&nbsp;
															</div>
														</div>
													</td>
												</tr>
												<tr>
													<td class="label">&nbsp;</td>
													<td class="data">&nbsp;</td>
												</tr>
												<tr>
													<td class="label">&nbsp;</td>
													<td class="data">&nbsp;</td>
												</tr>
												<tr>
													<td class="label">&nbsp;</td>
													<td class="data">&nbsp;</td>
												</tr>								
												<tr>
													<td class="label">&nbsp;</td>
													<td class="data">&nbsp;</td>
												</tr>
												<tr>
													<td class="label">&nbsp;</td>
													<td class="data">&nbsp;</td>
												</tr>
											</table>									
										</td>
									</tr>												
								</table>
							</div>
						</div>						
					</td>
				</tr>			
			</table>
		</td>
		</tr>
		<tr><td id="footer">This is footer</td></tr>
	</table>
	</body>
</html>